package com.wf.it.common.api;

import com.wf.it.common.api.hystrix.PlanServiceHystrixImpl;
import com.wf.it.common.entity.Plan;
import com.wf.it.common.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value="hp-plan",fallback = PlanServiceHystrixImpl.class)
public interface PlanService {
    @GetMapping("/plan/findbydoc")
    Result<List<Plan>> findByDocId(@RequestParam("empno") String empno);
    @GetMapping("/plan/findbyid")
    Result<Plan> findById(@RequestParam("planid") int planid);
    @PostMapping("/plan/changebookcount")
    Result updateBookCount(@RequestParam("planid")int planid, @RequestParam("num")int num);
}
